Micron Document




Comment (computer programming)
part 8/37 · 66.0 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Sometimes information stored in comments is used by development tools other than the translator – the primary tool that consumes the code. This information may include metadata (often used by a documentation generator) or tool configuration.

Some source code editors support configuration via metadata in comments.cite-ref-14[14] One particular example is the modeline feature of Vim which configures tab character handling. For example:

# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4

Support documentation generation

An API documentation generator parses information from a codebase to generate API documentation. Many support reading information from comments, often parsing metadata, to control the content and formatting of the resulting document.

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────